<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>FindString</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">FindString()</font></b></p>
<p><b>语法</b></p><blockquote>

Position = <font color="#006666"><b>FindString</b></font>(String$, StringToFind$ [, StartPosition [, Mode]])</blockquote>

</blockquote>
<b>概要</b><br><blockquote>



Find the 'StringToFind$' within the given 'String$'. 

 

</blockquote><p><b>参数</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>String$</i></td>
<td width="90%"> 
 
The string to use. 

 

</td></tr>
<tr><td><i>StringToFind$</i></td>
<td> 
 
The string to find. 

 

</td></tr>
<tr><td><i>StartPosition (optional)</i></td>
<td> 
 
The start position to begin the search. The first valid character index is 1. 
If this parameter isn't specified, the whole string is searched. 

 

</td></tr>
<tr><td><i>Mode (optional)</i></td>
<td> 
 
It can be one of the following values: 
 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_String_CaseSensitive</font>: case sensitive search (a=a) (default).
  <font color="#924B72">#PB_String_NoCase</font>       : case insensitive search (A=a).
</font></pre>

</td></tr>
</table>
</blockquote><p><b>返回值</b></p><blockquote>



Returns the position (in character) of the string to find, or zero is the string isn't found. The first character index is 1. 

 

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#006666">Debug</font></b> <font color="#006666">FindString</font>("PureBasic", "Bas") <font color="#006666">; will display 5</font>
</font></pre>

</Blockquote><p><b>已支持操作系统 </b><Blockquote>所有</Blockquote></p><center>&lt;- <a href=countstring.html>CountString()</a> - <a href=index.html>String Index</a> - <a href=hex.html>Hex()</a> -&gt;



</body></html>